home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1990: Night of the Living Disc / Night of the Living Disc.hdv / Dev.CD.5 / Tools / APW.Interfaces / CInclude / CType.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-03-01  |  1.2 KB  |  45 lines  |  [04] ASCII Text (0x0000)

  1. /*
  2.     ctype.h -- character types
  3.  
  4.     Copyright American Telephone & Telegraph
  5.     Modified and used with permission, Apple Computer Inc.
  6.     Copyright Apple Computer Inc. 1985, 1986, 1987
  7.     All rights reserved.
  8. */
  9.  
  10. #ifndef __CTYPE__
  11. #define __CTYPE__
  12.  
  13. /*    @(#)ctype.h       2.1  */
  14. /*    3.0 SID #         1.2   */
  15. #define _U       01
  16. #define _L       02
  17. #define _N       04
  18. #define _S       010
  19. #define _P       020
  20. #define _C       040
  21. #define _B       0100
  22. #define _X       0200
  23.  
  24. extern char      _ctype[];
  25.  
  26. #ifndef lint
  27. #define isalpha(c)      ((_ctype+1)[c]&(_U|_L))
  28. #define isupper(c)      ((_ctype+1)[c]&_U)
  29. #define islower(c)      ((_ctype+1)[c]&_L)
  30. #define isdigit(c)      ((_ctype+1)[c]&_N)
  31. #define isxdigit(c)     ((_ctype+1)[c]&_X)
  32. #define isalnum(c)      ((_ctype+1)[c]&(_U|_L|_N))
  33. #define isspace(c)      ((_ctype+1)[c]&_S)
  34. #define ispunct(c)      ((_ctype+1)[c]&_P)
  35. #define isprint(c)      ((_ctype+1)[c]&(_P|_U|_L|_N|_B))
  36. #define isgraph(c)      ((_ctype+1)[c]&(_P|_U|_L|_N))
  37. #define iscntrl(c)      ((_ctype+1)[c]&_C)
  38. #define isascii(c)      ((unsigned char)(c)<=0177)
  39. #define _toupper(c)     ((c)-'a'+'A')
  40. #define _tolower(c)     ((c)-'A'+'a')
  41. #define toascii(c)      ((c)&0177)
  42. #endif
  43.  
  44. # endif __CTYPE__
  45.